// main.js
$(function() {
	
	var client = new ZeroClipboard($("#copy_button") );

	client.on( "ready", function( readyEvent ) {
	  // alert( "ZeroClipboard SWF is ready!" );

	  client.on( "aftercopy", function( event ) {
	    // `this` === `client`
	    // `event.target` === the element that was clicked
	    //event.target.style.display = "none";
	    //alert("Copied text to clipboard: " + event.data["text/plain"] );
		  alert("Copied text to clipboard: " + $("#copy_button").attr("data-clipboard-text") );
		  $("#copy_button").after("<span>" + $("#copy_button").attr("data-clipboard-text") +  "</span>")
	  } );
	} );
	
});
